<div>
    <table class="grid" id="advancePaymentTbl" cellpadding="0" cellspacing="0" style="width: 100%" >
        <thead>
            <tr>
                <th style="width: 40px;">{translate}No.{/translate}</th>
                <th style="width: 130px;">{translate}Time{/translate}</th>
                <th style="width: 90px;">{translate}Receipt code{/translate}</th>
                <th style="width: 110px;">{translate}Collection type{/translate}</th>
                <th style="width: 90px;">{translate}Money amount{/translate}</th>
                <th style="width: 150px;">{translate}Cashier{/translate}</th>
                <th>{translate}Note{/translate}</th>
            </tr>
        </thead>
        <tbody>
            {if !empty($paymentInfo)}
            {foreach from=$paymentInfo item=info}
            <tr id="{$info.pay_receipt_id}">
                <td>{$index++}</td>
                <td>{$info.created_time_formatted}</td>
                <td>{$info.receipt_code}</td>
                <td style="color: {$info.color}">{$info.payment_type}</td>
                <td><span style="color: {$info.color}" id="amount_{$info.pay_receipt_id}">{$info.amount_formatted}</span></td>
                <td>{$info.cashier_name}</td>
                <td>{$info.note}</td>
            </tr>
            {/foreach}
            {if !isset($notShowTotal)}
            <tr class="last">
                <td colspan="4"><span style="color: blue">{translate}Total amount patient has paid{/translate}</span></td>
                <td><span style="color: blue">{$total}</span></td>
                <td colspan="3">&nbsp;</td>
            </tr>
            {/if}
            {else}
                <td colspan="7" class="first last">{translate}The patient has no payment receipts{/translate}</td>
            {/if}
        </tbody>
    </table>
</div>